var hdchangedate = (function () {
    var endDay;
    this.init = function () {

		$("#btnChangeDate").click(function (e) {
			var temp;
			
            temp = {
				EndDate: $("#txtEndDayChange").val()
			};
			data.DBdata.db.transaction(function (tx){
                tx.executeSql("UPDATE CurrentState SET StartDate='" + $("#txtStartDayChange").val() + "', EndDate='" +
                    $("#txtEndDayChange").val() + "'");
                hdmain.updateData();
            });

        });
        $("#btnChangeDateCancel").click(function () {
            
        });
    };
    this.updateStartEndDates = function (){
        data.DBdata.db.transaction(function (tx){
            tx.executeSql("SELECT StartDate, EndDate FROM CurrentState", [],
                function (tx, results){
                    $('#txtStartDayChange').val(results.rows.item(0).StartDate);
                    $('#txtEndDayChange').val(results.rows.item(0).EndDate);
                });
        });
    };
    this.init();
    return this;
}(hdchangedate || {}));